package com.lambda.use;

import org.junit.Test;

import java.util.function.Supplier;

/**
 * 功能描述
 *
 * @author: jichao.huang
 * @date: 2025年06月04日 17:19
 */
public class SupplierUseTest {
    @Test
    public void testGet() {
        Supplier<UserInfo> supplier = () -> new UserInfo();
        UserInfo userInfo = supplier.get();
        System.out.println(userInfo);

        Supplier<Double> supplier2 = Math::random;
        double random = supplier2.get();
        System.out.println(random);
    }
}
